/*
 * Function that uses Prototype to invoke an action of a form. Slurps the values
 * from the form using prototype's 'Form.serialize()' method, and then submits
 * them to the server using prototype's 'Ajax.Updater' which transmits the request
 * and then renders the response text into the named container.
 *
 * NOTE: Requires Prototype version 1.6 or above.
 *
 * @param form reference to the form object being submitted
 * @param event the name of the event to be triggered, or null
 * @param container the name of the HTML container to insert the result into
 */
function invoke(form, event, container) {
	if (!form.onsubmit) {
		form.onsubmit = function() {
			return false
		}
	}
	;
	var params = Form.serialize(form, {
		submit : event
	});
	new Ajax.Updater(container, form.action, {
		method : 'post',
		parameters : params
	});
}